﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.Sql;
using System.Data.SqlClient;
using System.Collections;
using GPCSC.Web;
using NickLee.Common;

namespace GPCSC.Web.CM
{
    public partial class newfkls : PageBase
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                f_bound();
            }

        }
        protected void f_bound()
        { 
            DataSet ds = new DataSet();
            Hashtable htable = new Hashtable();
            byte[] userInfo = (byte[])base.o_baseTable[c_obj.s_userInfo];
            Hashtable userInfoTable = CompressData.UnCompressHashtable(userInfo);
            Model.CL_USER_S users = (Model.CL_USER_S)userInfoTable["SYS_USER"];
            htable.Add("@userid", users.CL_USER_SOID.ToString());
            ds = new SqlReadXml().ReaderDataSet("sel_fkls_byuserid", htable);
            if (ds != null)
            {
                foreach (DataRow dr in ds.Tables[0].Rows)
                {
                    if (dr["xs"].ToString() == "1")
                    {
                        dr["xs"] = "已填写";
                    }
                    else
                    {
                        dr["xs"] = "未填写";
                    }
                    if (dr["bgs"].ToString() == "1")
                    {
                        dr["bgs"] = "已填写";
                    }
                    else
                    {
                        dr["bgs"] = "未填写";
                    }
                    if (dr["mq"].ToString() == "" || dr["mq"].ToString() == null)
                    {
                        dr["mq"] = 0; 
                    }
                    if (dr["bg"].ToString() == "" || dr["bg"].ToString() == null)
                    {
                        dr["bg"] = 0;
                    }
                }
            }
            PostListS.DataSource = ds;
            PostListS.DataBind();
        }

        protected void LCallBack_Callback(object sender, NickLee.Web.UI.CallBackEventArgs e)
        {

        }
    }
}